<?php

// use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Jialeo\LaravelSchemaExtend\Schema;
class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('id');
            $table->string('name')->comment('姓名');
            $table->string('email')->comment('邮箱,用于登录');
            $table->string('password')->comment('密码');
            $table->string('avatar')->comment('用户头像');
            $table->text('introduction')->comment('简介');
            $table->smallInteger('notification_count')->comment('未读消息数');
            $table->Integer('last_actived_at')->comment('最后登录时间');
            $table->rememberToken();
            $table->timestamps();

            $table->comment = '话题列表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
